package com.rdxer.api.para;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
public class SaveAccountPara {

    @NotNull
    private String id;
    @NotBlank
    private String username;
    @NotBlank
    String displayName;
    @Size(min = 3,max = 16,message = "密码长度在6-16位之间")
    String password;

    // 入职时间
    @NotNull
    @JsonSerialize(using= ToStringSerializer.class)
    Long entryDate;

    private String email;
    private String gender;
    private String avatar;

    // (0 deptid 1 roleid)
    private List<String> roles;

}
